/*     */ package dm.jdbc.driver;
/*     */ 
/*     */ import dm.jdbc.dataConvertion.Convertion;
/*     */ import dm.jdbc.desc.LobDesc;
/*     */ 
/*     */ 
/*     */ public class DmdbLobLocator
/*     */ {
/*     */   public byte m_lobFlag;
/*  10 */   public byte[] m_tableId = new byte[4];
/*  11 */   public byte[] m_colId = new byte[2];
/*  12 */   public byte[] m_blobId = new byte[8];
/*  13 */   public byte[] m_rowId = new byte[8];
/*     */   
/*  15 */   public int m_blobLen = 0;
/*     */   
/*     */ 
/*  18 */   public byte[] m_data_groupId = new byte[2];
/*  19 */   public byte[] m_data_fileId = new byte[2];
/*     */   
/*  21 */   public byte[] m_data_pageNo = new byte[4];
/*     */   
/*     */ 
/*     */ 
/*  25 */   public byte[] m_rec_groupId = new byte[2];
/*  26 */   public byte[] m_rec_fileId = new byte[2];
/*  27 */   public byte[] m_rec_pageNo = new byte[4];
/*     */   
/*     */ 
/*  30 */   public byte[] m_curFileId = new byte[2];
/*  31 */   public byte[] m_curPageNo = new byte[4];
/*  32 */   public byte[] m_TotalOffset = new byte[4];
/*  33 */   public byte[] m_curPageOffset = new byte[2];
/*     */   
/*  35 */   public byte[] m_dataOnceGet = null;
/*     */   
/*  37 */   private boolean m_isFilled = false;
/*     */   
/*  39 */   public boolean m_new_lob_flag = false;
/*     */   
/*     */   public DmdbLobLocator(byte[] lobValue, byte flag, LobDesc lobDesc, boolean new_lob_flag)
/*     */   {
/*  43 */     this.m_lobFlag = flag;
/*     */     
/*  45 */     Convertion.setInt(this.m_tableId, 0, lobDesc.getTabId());
/*  46 */     Convertion.setShort(this.m_colId, 0, lobDesc.getColId());
/*     */     
/*  48 */     byte[] len = new byte[4];
/*  49 */     System.arraycopy(lobValue, 9, len, 0, 4);
/*  50 */     this.m_blobLen = Convertion.fourByteToInt(len);
/*     */     
/*  52 */     System.arraycopy(lobValue, 1, this.m_blobId, 0, 
/*  53 */       8);
/*     */     
/*  55 */     if (lobValue[0] == 2) {
/*  56 */       System.arraycopy(lobValue, 13, this.m_data_groupId, 
/*  57 */         0, 2);
/*  58 */       System.arraycopy(lobValue, 15, 
/*  59 */         this.m_data_fileId, 0, 2);
/*  60 */       System.arraycopy(lobValue, 17, 
/*  61 */         this.m_data_pageNo, 0, 4);
/*     */     }
/*     */     else {
/*  64 */       Convertion.setShort(this.m_data_groupId, 0, (short)-1);
/*  65 */       Convertion.setShort(this.m_data_fileId, 0, (short)-1);
/*  66 */       Convertion.setInt(this.m_data_pageNo, 0, -1);
/*     */     }
/*     */     
/*  69 */     if (new_lob_flag) {
/*  70 */       System.arraycopy(lobValue, 21, this.m_tableId, 
/*  71 */         0, 4);
/*  72 */       System.arraycopy(lobValue, 25, this.m_colId, 0, 
/*  73 */         2);
/*  74 */       System.arraycopy(lobValue, 27, this.m_rowId, 0, 
/*  75 */         8);
/*     */       
/*  77 */       System.arraycopy(lobValue, 35, 
/*  78 */         this.m_rec_groupId, 0, 2);
/*  79 */       System.arraycopy(lobValue, 37, 
/*  80 */         this.m_rec_fileId, 0, 2);
/*  81 */       System.arraycopy(lobValue, 39, 
/*  82 */         this.m_rec_pageNo, 0, 4);
/*     */     }
/*     */     
/*  85 */     System.arraycopy(this.m_data_fileId, 0, this.m_curFileId, 0, 2);
/*  86 */     System.arraycopy(this.m_data_pageNo, 0, this.m_curPageNo, 0, 4);
/*     */     
/*  88 */     Convertion.setInt(this.m_TotalOffset, 0, 0);
/*  89 */     Convertion.setShort(this.m_curPageOffset, 0, (short)0);
/*     */     
/*  91 */     this.m_new_lob_flag = new_lob_flag;
/*     */     
/*  93 */     this.m_isFilled = true;
/*     */   }
/*     */   
/*     */   public void setCurToHead() {
/*  97 */     System.arraycopy(this.m_data_fileId, 0, this.m_curFileId, 0, 2);
/*  98 */     System.arraycopy(this.m_data_pageNo, 0, this.m_curPageNo, 0, 4);
/*     */     
/* 100 */     Convertion.setInt(this.m_TotalOffset, 0, 0);
/* 101 */     Convertion.setShort(this.m_curPageOffset, 0, (short)0);
/*     */   }
/*     */   
/*     */   public void setCurFieldId(byte[] curFiledId) {
/* 105 */     System.arraycopy(curFiledId, 0, this.m_curFileId, 0, this.m_curFileId.length);
/*     */   }
/*     */   
/*     */   public void setCurPageNo(byte[] curPageNo) {
/* 109 */     System.arraycopy(curPageNo, 0, this.m_curPageNo, 0, this.m_curPageNo.length);
/*     */   }
/*     */   
/*     */   public void setTotalOffset(byte[] TotalOffset) {
/* 113 */     System.arraycopy(TotalOffset, 0, this.m_TotalOffset, 0, this.m_TotalOffset.length);
/*     */   }
/*     */   
/*     */   public void setCurPageOffSet(byte[] curPageOffSet) {
/* 117 */     System.arraycopy(curPageOffSet, 0, this.m_curPageOffset, 0, 
/* 118 */       this.m_curPageOffset.length);
/*     */   }
/*     */   
/*     */   public void setBlobId(byte[] blobid) {
/* 122 */     System.arraycopy(blobid, 0, this.m_blobId, 0, this.m_blobId.length);
/*     */   }
/*     */   
/*     */   public void setGroupId(byte[] grpid) {
/* 126 */     System.arraycopy(grpid, 0, this.m_data_groupId, 0, this.m_data_groupId.length);
/*     */   }
/*     */   
/*     */   public void setFileId(byte[] fileid) {
/* 130 */     System.arraycopy(fileid, 0, this.m_data_fileId, 0, this.m_data_fileId.length);
/*     */   }
/*     */   
/*     */   public void setPageNo(byte[] pageNo) {
/* 134 */     System.arraycopy(pageNo, 0, this.m_data_pageNo, 0, this.m_data_pageNo.length);
/*     */   }
/*     */   
/*     */   public boolean IsFilled() {
/* 138 */     return this.m_isFilled;
/*     */   }
/*     */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\jdbc\driver\DmdbLobLocator.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */